Arduino Applied by Neil Cameron
Color-Recognition Sensor
The color-recognition sensor TCS230 has an array of 64 photodiodes with red, blue, green, and clear color filters. There are 16 photodiodes for each color filter and the color-recognition sensor produces a square wave with the frequency proportional to the light intensity of the relevant color.
The color-recognition sensor has two pairs of control pins with pin states HIGH or LOW that determine which filter is activated and the scaling of the output frequency (see Table 14-1). The output frequency scaling can be set to 100% by connecting color-recognition sensor control pins S0 and S1 to 5V (see Table 14-2). The status of color-recognition sensor control pins S2 and S3 to activate a color filter is determined in the sketch.Table 14-1Control Pins of the Color-Recognition Sensor